<template>
 <div>
  <commons-menu @news-added="handleProductAdded"></commons-menu>
  <product-list ref="productList"></product-list>
 </div>
</template>

<script>
import CommonsMenu from '@/components/CommonsMenu.vue';
import ProductList from '@/components/ProductList.vue';
export default {
    name:'ProductListView',
    components:{
        CommonsMenu,
        ProductList,
    },
    methods: {
    handleProductAdded() {
      this.$refs.ProductList.fetchProductData();
    }
  },
  created() {
    this.$store.commit('setShowPage',2)
  },
}
</script>

<style>

</style>